<script setup lang="ts">
import HeadBar from '@/components/bar/HeadBar.vue';
import FooterBar from '@/components/bar/FooterBar.vue';
import { useRouter } from 'vue-router'

const router = useRouter()

// 监听路由变化，页面跳转时自动滚动到顶部
router.afterEach(() => {
  window.scrollTo(0, 0)
})
</script>

<template>
  <div class="w-full bg-[#F5F5F5]">
    <HeadBar class="fixed top-0 left-0 right-0 z-99" />
    <main class="w-full min-h-[100vh]">
      <router-view />
    </main>
    <FooterBar />
  </div>
</template>

<style scoped>
/* 全局样式可以在这里添加 */
</style>
